﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcMall.AdminPortal.Controllers.Store.ViewModels;
using MvcMall.Framework.Mapper;

namespace MvcMall.AdminPortal.Controllers.Store.Mappers
{
    public class DomainToStoreModel : BaseMapper<Core.Domains.Store, StoreModel>
        , IMapper<Core.Domains.Store, StoreModel>
    {
        public override StoreModel MapFrom(Core.Domains.Store input)
        {
            var model = base.MapFrom(input);
            model.StoreTypeNames = input.StoreType.ToString();
            model.StoreGradeName = input.StoreGrade.GradeName;
            model.StoreId = input.Id;
            return model;
        }
    }
}
